package handel

import (
	"github.com/gin-gonic/gin"
	"medi-mange/medi-manage/model"
)

func MediList(c *gin.Context) {
	var patient []model.Patient
	err := model.DB.Find(&patient).Error
	if err != nil {
		c.JSON(200, gin.H{
			"code": 500,
			"msg":  "列表展示失败",
		})
		return
	}
	c.JSON(200, gin.H{
		"code": 200,
		"msg":  "列表展示成功",
		"data": patient,
	})
	return
}
